if(toolbox_values.dtb_vb_enabled!=='1'||(toolbox_values.dtb_vb_enabled==='1'&&self==top)){ jQuery(document).ready(function ($){ function dtb_equalize_heights(selector){ var heights=new Array(); $(selector).each(function(){ $(this).css('min-height', '0'); $(this).css('max-height', 'none'); $(this).css('height', 'auto'); heights.push($(this).height()); }); var max=Math.max.apply(Math, heights); $(selector).each(function(){ $(this).css('height', max + 'px'); }); } function dtb_equalize_heights_min(selector){ var heights=new Array(); $(selector).each(function(){ $(this).css('min-height', '0'); $(this).css('max-height', 'none'); $(this).css('height', 'auto'); heights.push($(this).height()); }); var min=Math.min.apply(Math, heights); $(selector).each(function(){ $(this).css('height', min + 'px'); }); } function dtb_equalize(){ var iv=null; if(iv!==null){window.clearTimeout(iv);} iv=setTimeout(function(){ if(toolbox_values.dtb_equal_archive_boxed==1){ dtb_equalize_heights('.dtb_archives .et_pb_post .dtb-post-wrap, .dtb-blog.et_pb_module .et_pb_post .dtb-post-wrap'); } if(toolbox_values.dtb_equal_archive_img==1){ dtb_equalize_heights_min('.entry-featured-image-url'); }}, 120); } dtb_equalize(); $(window).resize(dtb_equalize); $(document).bind('ready ajaxComplete', function (){ $('.more-link').text(toolbox_values.dtb_readmore_text); $('#respond #reply-title>span').text(toolbox_values.dtb_comments_text); $('#dtb-before-footer').detach().insertBefore('#main-footer, .et-l--footer'); $('#dtb-after-footer').detach().insertAfter('#main-footer, .et-l--footer'); $('#dtb-before-header').detach().prependTo('#page-container'); $('#dtb-after-blog-content').detach().insertBefore('#comment-wrap'); }); if((toolbox_values.dtb_btt==1)&&(toolbox_values.dtb_btt_link==1)){ $('.et_pb_scroll_top').append(''); $('.et_pb_scroll_top').off('click'); $('.btt_link').attr('href', toolbox_values.dtb_btt_url); } if(toolbox_values.dtb_fixed_scroll==1){ $(window).scroll(function(){ if($(window).scrollTop() >=toolbox_values.dtb_fixed_scroll_offset){ $('body').addClass('scrolled-down'); }else{ $('body').removeClass('scrolled-down'); }}); } $('.dtb_archives .et_pb_post').contents().filter(function (){ return this.nodeType==3&&$.trim(this.nodeValue).length; }).wrap('
'); $('.dtb_archives .et_pb_post').each(function (){ if($('.dtb-post-wrap', this).length < 1){ $('>:not(.entry-featured-image-url)', this).wrapAll('
'); } if($('.more-link', this).length < 1){ if((toolbox_values.dtb_archive_button!='')&&(toolbox_values.dtb_archive_styles!='')){ link_target=$(this).find('a').attr('href'); $('.dtb-post-wrap', this).append("" + toolbox_values.dtb_readmore_text + ""); }} }); if(toolbox_values.dtb_sticky_footer==1){ function positionFooter(){ var mFoo=$("body:not(.et-fb) #main-footer, body:not(.et-fb) .et-l--footer"); var bFoo=$("body:not(.et-fb) #dtb-before-footer"); var aFoo=$("body:not(.et-fb) #dtb-after-footer"); if((($(document.body).height() + mFoo.outerHeight() + bFoo.outerHeight() + aFoo.outerHeight()) < $(window).height()&&mFoo.css("position")=="fixed")||($(document.body).height() < $(window).height()&&mFoo.css("position")!="fixed")){ if(aFoo.outerHeight() > 0){ mFoo.css({ position: "fixed", bottom: aFoo.outerHeight() + "px", right: "0", left: "0" }); }else{ mFoo.css({ position: "fixed", bottom: "0", right: "0", left: "0" }); } bFoo.css({ position: "fixed", bottom: mFoo.outerHeight() + aFoo.outerHeight() + "px", right: "0", left: "0" }); aFoo.css({ position: "fixed", bottom: "0", right: "0", left: "0" }); }else{ mFoo.css({ position: "", bottom: "", right: "", left: "" }); bFoo.css({ position: "", bottom: "", right: "", left: "" }); aFoo.css({ position: "", bottom: "", right: "", left: "" }); }} $(document).ready(function (){ positionFooter(); $(window).scroll(positionFooter); $(window).resize(positionFooter); }); } if(toolbox_values.dtb_enable_typing==1){ var count=0; $('.et_pb_text.dtb-typing .et_pb_text_inner').each(function (){ $(this).wrap("x
',r.appendChild(i.childNodes[1])}return e&&t.extend(n,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&e.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);var i=t(this).find(e.join(","));(i=(i=i.not("object object")).not(r)).each((function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var n=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var i="fitvid"+t.fn.fitVids._count;e.attr("name",i),t.fn.fitVids._count++}e.wrap('').parent(".fluid-width-video-wrapper").css("padding-top",100*n+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto)},function(t,e){ !function(){"use strict";function t(r){if(!r)throw new Error("No options passed to Waypoint constructor");if(!r.element)throw new Error("No element option passed to Waypoint constructor");if(!r.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,r),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=r.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),n[this.key]=this,e+=1}var e=0,n={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete n[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var r in n)e.push(n[r]);for(var i=0,o=e.length;o>i;i++)e[i][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=i.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+n,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,r[t.waypointContextKey]=this,n+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var n=0,r={},i=window.Waypoint,o=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete r[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",(function(){e.didResize||(e.didResize=!0,i.requestAnimationFrame(t))}))},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",(function(){(!e.didScroll||i.isTouch)&&(e.didScroll=!0,i.requestAnimationFrame(t))}))},e.prototype.handleResize=function(){i.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var n in e){var r=e[n],i=r.newScroll>r.oldScroll?r.forward:r.backward;for(var o in this.waypoints[n]){var a=this.waypoints[n][o],s=r.oldScroll